﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
//using System.Xml.Linq;
using System.Collections.Generic;

using YouHP.BLL;
using YouHP.Model;
using YouHP.Utility;

namespace web.admin
{
    public partial class PrescriptionDetail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
        }

        private void BindData()
        {
            try
            {
                int prescriptionId = RequestTools.GetInt("pid", -1);
                if (prescriptionId <= 0)
                    return;

                PrescriptionInfo prescription = PrescriptionBLL.Instance.GetPrescriptionInfo(prescriptionId);
                List<PrescriptionInfo> list = new List<PrescriptionInfo>();
                list.Add(prescription);

                this.PrescriptionDetailsView.DataSource = list;
                this.PrescriptionDetailsView.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
